package com.itheima.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @Author yangshuai
 * @Desc:首页员工管理实体类
 * @Date ${TIME} ${DATE}
 * @Version 1.0
 **/
@TableName("employee")
@Data
public class Employee implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long id;
    //用户名
    private String username;
    //姓名
    private String name;
    //密码
    private String password;
    //手机号
    private String phone;
    //性别
    private String sex;

    private String idNumber; //驼峰命名法 ---> 映射的字段名为 id_number

    private Integer status;
    //插入时,自动填充,createTime是创建时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    //插入和更新时填充字段，updateTime是修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    //插入时,自动填充,updateTime是创建人
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    //插入和更新时填充字段，updateUser是修改人
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
}

